﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Forum.DataAccess.DbModel;

namespace Forum.Domain.Managers
{
    public class UserManager : ManagerBase
    {
        public UserManager() { }

        public User GetUser(int id) 
        {
            return (from u in DbContext.Users
                    where u.Id == id
                    select u).SingleOrDefault();
        }

        public void CreateUser(User user)
        {
            DbContext.Users.AddObject(user);
            DbContext.SaveChanges();

        }

    }
}
